﻿using AskPro.Models;
using AskPro.Models.DataContext;
using AskPro.Models.Repositories;
using AskPro.Models.Wrappers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.OData;

namespace AskPro.Controllers
{
    public class QuestionsController : ApiBaseController
    {
        public QuestionRepository qRep { get; set; }

        public QuestionsController()
        {
            this.qRep = new QuestionRepository();
        }

        [HttpGet]
        public object GetMyDeviceId()
        {
            var result = new { imageUri = "imageUri data eva", question = "the question damn you!" };
            return result;
        }

        [HttpGet]
        public IEnumerable<QuestionW> GetQuestions(int page)
        {
            return qRep.GetQuestions(page);
        }
        
	}
}